﻿using Microsoft.AspNetCore.Mvc.Filters;
using XuanXiang.Infrastructure.Dto.Response.System;
using XuanXiang.Infrastructure.EFCore.MySql;
using XuanXiang.Service.Instance;
using XuanXiang.Service.Interface;

namespace XuanXiang.Api.Admin.Filters
{
    public class Base_Filter : ActionFilterAttribute
    {
        private readonly I_Login_Service _login_Service;


        public Base_Filter(I_Login_Service login_Service)
        {
            _login_Service = login_Service;

        }

        /// <summary>
        /// 获取当前登录的用户
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        public Users_Dto Get_Users(string code) {
         
          
            return _login_Service.Check_Login(code,"");
        }
    }
}
